package us.wili.dev.client.model.rsp;

import com.alibaba.fastjson.annotation.JSONField;
import io.swagger.annotations.ApiModelProperty;
import us.wili.dev.common.model.IdLongToStrSerializer;
import us.wili.dev.model.entity.Activity;

public class ActivityRsp {
    @ApiModelProperty(value="id")
    @JSONField(serializeUsing = IdLongToStrSerializer.class)
    private Long id;

    @ApiModelProperty(value="活动名字")
    private String name;

    @ApiModelProperty(value="活动标签")
    private String b;

    @ApiModelProperty(value="活动图片")
    private String pic;

    public static ActivityRsp ToActivity(Activity activity){
        ActivityRsp rsp =new ActivityRsp();
        rsp.setId(activity.getId());
        rsp.setName(activity.getActivityName());
        rsp.setB(activity.getActivityB());
        rsp.setPic(activity.getActivityPic());
        return rsp;
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getB() {
        return b;
    }

    public void setB(String b) {
        this.b = b;
    }

    public String getPic() {
        return pic;
    }

    public void setPic(String pic) {
        this.pic = pic;
    }
}
